package com.heima.article.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.article.dtos.ArticleHomeDto;
import com.heima.model.article.pojo.ApArticle;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.web.bind.annotation.RequestBody;

public interface ApArticleService extends IService<ApArticle> {

    /**
     * @description:根据参数加载文章列表
     * @author: sunhaonan
     * @param:tupe 1加载更多  2加载最新
     * @param:dto
     * @return:
     **/
    ResponseResult load(ArticleHomeDto dto, Short type);

    /**
     * @description:保存app端相关文章
     * @author: sunhaonan
     * @param:dto
     * @return:
     **/
    ResponseResult saveArticle(@RequestBody ArticleDto dto);

    /**
     * 更新上下架
     *
     * @param msg msg
     * @return {@link ResponseResult}
     */
    ResponseResult updateIsDown(String msg);
}
